<%@page import="net.xxcl.news.business.UserBiz"%>
<%@page import="net.xxcl.news.pojo.User"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%
	request.setCharacterEncoding("utf-8");
	String name = request.getParameter("uname");
	String pwd = request.getParameter("upwd");
	UserBiz userBiz = new UserBiz();
	User user = userBiz.login(name, pwd);	
	if(user!=null){
		session.setAttribute("user", user);
		request.getRequestDispatcher("admin.jsp").forward(request, response);
	} else {
		request.setAttribute("message", "用户名或者密码错误！");
		request.getRequestDispatcher("index.jsp").forward(request, response);
	}
%>
